Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(server): emulate readonly command #1004

Merged
merged 2 commits into from
Mar 29, 2023
Merged

bug(server): emulate readonly command #1004

merged 2 commits into from
Mar 29, 2023

Conversation

ashotland
Copy link
Contributor

@ashotland ashotland commented Mar 28, 2023

For cluster mode.
Simply return OK.

Fixes #1003

@@ -1262,6 +1264,9 @@ void ServerFamily::Cluster(CmdArgList args, ConnectionContext* cntx) {
std::string msg = BuildClusterNodeReply(cntx);
(*cntx)->SendBulkString(msg);
return;
} else if (sub_cmd == "READONLY") {
(*cntx)->SendOk();
Copy link
Collaborator

@romange romange Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have not checked with https://github.com/mediocregopher/radix that it works, have not you? :)

it does not fix the issue because this is not a subcommand. it's a separate command that exists only in cluster mode. so you need to register it conditionally only if we run in emulated mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, have not tested with radix.

@ashotland ashotland force-pushed the cluster-readonly branch 2 times, most recently from 72fe27f to 2a78350 Compare March 28, 2023 13:21
@ashotland ashotland changed the title bug(server): emulate cluster readonly subcommand bug(server): emulate readonly command Mar 28, 2023
For cluster mode.
Simply retun OK.

Signed-off-by: ashotland <ari@dragonflydb.io>
@ashotland ashotland requested a review from romange March 28, 2023 13:52
@@ -42,6 +42,7 @@ extern "C" {
#include "server/tiered_storage.h"
#include "server/transaction.h"
#include "server/version.h"
#include "server_family.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need

Signed-off-by: ashotland <ari@dragonflydb.io>
@ashotland ashotland requested a review from romange March 29, 2023 07:04
@romange romange merged commit 44c4771 into main Mar 29, 2023
@romange romange deleted the cluster-readonly branch March 29, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cluster emulation : READONLY not implemented
2 participants